package init

import (
	"fmt"
	"gin-user/config"

	"github.com/spf13/viper"
)

func InitConfig() {
	var err error
	viper.SetConfigFile("./config.yaml")
	viper.ReadInConfig()
	viper.Unmarshal(&config.AppConf)
	if err != nil {
		panic(err)
	}
	fmt.Println("配置成功")
}
